package com.bfly.mall.order.dto;

import com.alibaba.fastjson.annotation.JSONField;
import com.bfly.mall.product.enums.ShippingMethodEnum;

import java.io.Serializable;

/**
 * 订单物流信息DTO
 *
 * @author 长沙商脉科技有限公司
 * @date 2020/4/17 21:59
 */
public class OrderExpressDTO implements Serializable {

    private static final long serialVersionUID = -6757466141592325772L;

    @JSONField(serialize = false)
    private int type;
    private String name;
    private String expressNo;

    public String getTypeName() {
        ShippingMethodEnum typeEnum = ShippingMethodEnum.getShippingMethod(getType());
        return typeEnum == null ? "" : typeEnum.getName();
    }

    public int getType() {
        return type;
    }

    public void setType(int type) {
        this.type = type;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getExpressNo() {
        return expressNo;
    }

    public void setExpressNo(String expressNo) {
        this.expressNo = expressNo;
    }
}
